<extend name="Base/base" />
<block name='head'>
   
</block>
<block name="content"> 
    <section class="larry-wrapper" style="padding-top: 20px">
        <!--<p class="nav-title"><span>缺勤信息</span></p>-->
        <!--第一部分-->
        <div class="row page-inquire">
            <div class="col-lg-12 col-sm-12">	
                <form class="form" method="get">
                    <div class="layui-row">
                        <div class="layui-inline">
                            <label class="layui-form-label">类别：</label>
                            <div class="layui-input-inline">
                                <select class="layui-input search_input" name="type" style="min-width: 120px;">
                                    <option value="0">请选择</option>
                                    <option value="1" {$type == 1 ? 'selected' : ''}>信息化产品</option>
                                    <option value="2" {$type == 2 ? 'selected' : ''}>低值易耗品</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">物品名称：</label>
                            <div class="layui-input-inline">
                                <input type="text" placeholder="请输入物品名称" name="name" value="{$name}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">凭证号：</label>
                            <div class="layui-input-inline">
                                <input type="text" placeholder="请输入凭证号" name="number" value="{$number}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">类型：</label>
                            <div class="layui-input-inline">
                                <select class="layui-input search_input" name="goodsType" style="min-width: 120px;">
                                    <option value="1" {$gType == 1 ? 'selected' : ''}>入库</option>
                                    <option value="2" {$gType == 2 ? 'selected' : ''}>出库</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <a class="layui-btn search_btn search">查询</a>
                        </div>
                    </div>
                </form>
                <div class="layui-row">
                    <table class="layui-table setTabBg" lay-skin="line">
                        <thead>
                            <tr>
                                <th>序号</th>
                                <th>类别</th>
                                <th>名称</th>
                                <th>凭证号</th>
                                <th>产品型号</th>
                                <th>单位</th>
                                <th>实际数量</th>
                                <th>入库时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        <notempty name="data">
                            <foreach name="data" item="row">
                                <tr>
                                    <td>{$row.page}</td>
                                    <td>{$row.goods_id|getGoodsType}</td>
                                    <td>{$row.goods_id|getGoodsName}</td>
                                    <td>{$row.number}</td>
                                    <td>{$row.model}</td>
                                    <td>{$row.unit}</td>
                                    <td>{$row.count}</td>
                                    <td>{$row.create_time|date="Y-m-d H:i",###}</td>
                                    <td><a class="pointer delete" data-url="{:U('delete',array('id'=>$row[id]))}">删除</a></td>
                                </tr>
                            </foreach>
                            <else />
                            <tr><td colspan="3" style="border-bottom: 1px solid #fff;border-left: 1px solid #fff;text-align: left">暂无数据</td></tr>
                        </notempty>
                        </tbody>
                    </table>
                </div>
                <div class="larry-table-page clearfix">
                    <input type='hidden' id="" value="">
                    <div id="page" class="page">{$page}</div>
                </div>
            </div>
        </div>
    </section>
</block>
<block name="script">
    <script type="text/javascript" src="/Public/Admin/js/goods.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/common.js"></script>
    <script type="text/javascript">
        $(initGoods());


    </script>    
</block>

